<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>导入明细</title>
	</head>

	<body>
	
	
	 <div>
	   <a class="btn btn-primary" href="${ctx}/v2_lpn/v2_show">返回查询页面</a>
	</div>
	
	
		
	<c:if test="${status eq '1' }">
	
	<!-- 同步结果 -->
	<table  class="table table-striped table-bordered table-condensed">
		<thead>
		<tr bgcolor="#3FA8F3" >
		   <th colspan="14"  style="height: 30px;font-size: 18px;color: white; vertical-align: middle;" >订单导入结果 </th>
		<tr>
		</thead>
		<tbody>
		   
			<tr>
			  <td>数量总量（条）</td><td>${number}</td> 
			</tr>
			<tr>
			  <td>成功数据（条）</td><td>${fn:length(normal)}</td>
			</tr>
			<tr>
			  <td>重复导入数据（条）</td><td>${fn:length(repeat)}</td>
			</tr>
			<tr>
			  <td>失败数据（条）</td><td>${fn:length(exception)}</td>
			</tr>
		</tbody>
	</table>
	
	
	<!-- 重复导入的 -->
	<table  class="table table-striped table-bordered table-condensed">
		<thead>
		<tr bgcolor="#3FA8F3" >
		   <th colspan="2"  style="height: 30px;font-size: 18px;color: white; vertical-align: middle;" >以下订单导入重复,请核对后重新同步</th>
		<tr>
		</thead>
		<tbody>
		    <c:if test="${empty repeat or repeat.size() eq 0}">
			     <tr><td colspan="2" height="50" style="vertical-align:middle; text-align: center;color: gray;font-size: 20px;">无数据</td></tr>
		   </c:if>
			<c:forEach items="${repeat}" var="obj">
			<tr>
			   <tr>
						<td>
							${obj.warehouseCode}
						</td>
						<td>
							${obj.lpnNo}
						</td>
					
			</tr>
			</c:forEach>
		</tbody>
	</table>
	
	
	<!-- 同步失败的 -->
	<table  class="table table-striped table-bordered table-condensed">
		<thead>
		<tr bgcolor="#3FA8F3" >
		   <th colspan="2"  style="height: 30px;font-size: 18px;color: white; vertical-align: middle;" >以下订单导入失败,请核对后重新同步</th>
		<tr>
		</thead>
		<tbody>
		    <c:if test="${empty exception or exception.size() eq 0}">
			     <tr><td colspan="2" height="50" style="vertical-align:middle; text-align: center;color: gray;font-size: 20px;">无数据</td></tr>
		   </c:if>
			<c:forEach items="${exception}" var="obj">
			<tr>
			   <tr>
						<td>
							${obj.warehouseCode}
						</td>
						<td>
							${obj.lpnNo}
						</td>
					
			</tr>
			</c:forEach>
		</tbody>
	</table>
	
	
	
	
	<div style="color: #3FA8F3;">
		LPN成功总数量:<font size="20">${fn:length(normal)}</font>
		</div>
	<table id="contentTable"
			class="table table-striped table-bordered table-condensed">
			<thead>
				<tr>
				    <th>
						仓库
					</th>
					<th>
						LPN
					</th>
					
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${normal}" var="order">
					<tr>
					   
						<td>
							${order.warehouseCode}
						</td>
						<td>
							${order.lpnNo}
						</td>
						
					</tr>
				</c:forEach>
			</tbody>
		</table>

	</c:if>
	<c:if test="${status eq '2' }">
	
	<!-- 同步结果 -->
	<table  class="table table-striped table-bordered table-condensed">
		<thead>
		<tr bgcolor="#3FA8F3" >
		   <th colspan="14"  style="height: 30px;font-size: 18px;color: white; vertical-align: middle;" >商品导入结果 </th>
		<tr>
		</thead>
		<tbody>
		   <tr>
			  <td>信息</td><td>${message}</td> 
			</tr>
			<tr>
			  <td>数量总量（条）</td><td>${number}</td> 
			</tr>
			<tr>
			  <td>已同步数据（条）</td><td>${fn:length(normal)}</td>
			</tr>
			<tr <c:if test="${exception.size() gt 0}">style="color:red"</c:if>>
			  <td><span >异常数据（条）</span></td><td>${fn:length(exception)}</td>
			</tr>
		</tbody>
	</table>
	

		
	
	</c:if>
	</body>
</html>
